<template>
  <div class="app-container">
    <div style="width: 1000px;">
      <el-form ref="form" :model="form" :rules="rules" label-width="120px">
        <el-form-item label="标题名称" prop="postName">
          <el-input v-model="form.postName" placeholder="请输入标题名称" />
        </el-form-item>
        <el-form-item label="活动描述" prop="postName">
          <quill-edit v-model="form.postName" :height="300"></quill-edit>
        </el-form-item>
        <el-form-item label="关联店铺" prop="postCode">
          <el-select v-model="form.postCode" placeholder="请选择关联商品">
            <el-option label="item.label" value="item.value" />
            <el-option label="item.label" value="item.value" />
          </el-select>
        </el-form-item>
        <el-form-item label="关联商品" prop="postSort">
          <el-select v-model="form.postCode" placeholder="请选择关联商品">
            <el-option label="item.label" value="item.value" />
            <el-option label="item.label" value="item.value" />
          </el-select>
        </el-form-item>
        <el-form-item label="轮播图片" prop="postSort">
          <image-upload :isShowTip="false" v-model="form.postSort" :limit="1"></image-upload>
        </el-form-item>
        <el-form-item label="启用状态" prop="status">
          <el-radio-group v-model="form.status">
            <el-radio label="1">启动</el-radio>
            <el-radio label="2">禁用</el-radio>
          </el-radio-group>
        </el-form-item>
        <el-form-item label="排序号" prop="remark">
          <el-input-number v-model="form.remark" controls-position="right" :min="1" :max="999"></el-input-number>
        </el-form-item>
        <el-form-item label="备注" prop="remark">
          <el-input v-model="form.remark" type="textarea" placeholder="请输入备注" />
        </el-form-item>
        <el-form-item label=" ">
            <el-button type="primary" @click="submitForm">确 定</el-button>
            <el-button type="primary" @click="submitForm">预 览</el-button>
            <el-button @click="cancel">取 消</el-button>
        </el-form-item>
      </el-form>
    </div>
  </div>
</template>
<script>
  import QuillEdit from "@/components/Editor";
  export default {
    components:{
      QuillEdit
    },
    data() {
      return {
        form: {}
      }
    },
    beforeCreate() {
      this.$route.meta.title = '新增'
    },
    methods: {
      submitForm(){

      },
      cancel(){

      }
    },
  }
</script>
<style lang="scss" scoped>
</style>
